package org.jaaksi.view.filterbar.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Fcy on 2015/10/31.<br/>
 * 记录下标
 */
public class FilterIndexInfo implements Serializable
{
	/**
	 * 获取默认值的bean
	 * 
	 * @return
	 */
	public static FilterIndexInfo getEmptyBean()
	{
		FilterIndexInfo bean = new FilterIndexInfo();
		bean.areaIndexInfo = new AreaIndexInfo();
		bean.houseTypeIndexList = new ArrayList<>();
		MoreIndexInfo moreInfo = new MoreIndexInfo();
		moreInfo.featureIndexList = new ArrayList<>();
		bean.moreIndexInfo = moreInfo;
		return bean;
	}

	/**
	 * 区域index，三级列表
	 */
	public AreaIndexInfo areaIndexInfo;

	/**
	 * 房型：几居室，可多选
	 */
	public List<Integer> houseTypeIndexList;

	/**
	 * 价格，单选 -1表示自定义
	 */
	public int priceIndex;

	/**
	 * 更多中的下标
	 */
	public MoreIndexInfo moreIndexInfo;

	@Override
	public String toString() {
		return "FilterIndexInfo{" +
			"areaIndexInfo=" + areaIndexInfo +
			", houseTypeIndexList=" + houseTypeIndexList +
			", priceIndex=" + priceIndex +
			", moreIndexInfo=" + moreIndexInfo +
			'}';
	}

	public static class AreaIndexInfo
	{
		public int leftIndex;
		public int midIndex;
		public int rightIndex;

		@Override
		public String toString() {
			return "AreaIndexInfo{" +
				"leftIndex=" + leftIndex +
				", midIndex=" + midIndex +
				", rightIndex=" + rightIndex +
				'}';
		}
	}

	public static class MoreIndexInfo implements Serializable
	{
		/**
		 * 在售状态
		 */
		public int saleState;
		// 特色feature
		public List<Integer> featureIndexList;

		@Override
		public String toString() {
			return "MoreIndexInfo{" +
				"saleState=" + saleState +
				", featureIndexList=" + featureIndexList +
				'}';
		}
	}
}
